package indi.yangshenhui.tool;

import java.util.Collection;
import java.util.Map;

public class CollectionUtil {

	private CollectionUtil() {
	}

	public static boolean isEmpty(Collection<?> collection) {
		if (collection == null) {
			return true;
		} else {
			return collection.isEmpty();
		}
	}

	public static boolean isNotEmpty(Collection<?> collection) {
		return !isEmpty(collection);
	}

	public static boolean isEmpty(Map<?, ?> map) {
		if (map == null) {
			return true;
		} else {
			return map.isEmpty();
		}
	}

	public static boolean isNotEmpty(Map<?, ?> map) {
		return !isEmpty(map);
	}

}